<template>
  <div class="page">
    <div class="mb-3.5 n-layout-page-header" v-if="title || content || $slots.headerContent">
      <el-card shadow="never" class="border-none">
        <template #header>
          <div class="header-title">{{ title }}</div>
        </template>
        {{ content }}
        <slot name="headerContent"></slot>
      </el-card>
    </div>
    <div class="app-content" :style="contentStyle" :class="contentClass">
      <slot></slot>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { basicProps } from './props';
  defineProps({ ...basicProps });
</script>

<style lang="scss" scoped>
  .page {
    .mb-4 {
      margin-bottom: 1rem;
    }
    .header-title {
      font-weight: 700;
      font-size: 16px;
      color: var(--el-text-color-primary);
    }
  }
</style>
